package org.inspursc.s0517.health.evaluation.converter;

import org.inspursc.s0517.health.evaluation.dto.ReportShareDTO;
import org.inspursc.s0517.health.evaluation.entity.ReportShare;
import org.springframework.beans.BeanUtils;

/**
 * @author yuchu
 */
public class ReportShareConverter {

    public static ReportShare converter(ReportShareDTO dto) {
        ReportShare reportShare = new ReportShare();
        BeanUtils.copyProperties(dto, reportShare);
        return reportShare;
    }

    public static ReportShareDTO converter(ReportShare reportShare) {
        ReportShareDTO dto = new ReportShareDTO();
        BeanUtils.copyProperties(reportShare, dto);
        return dto;
    }
}
